<?php

namespace App\Models\Cms;

use App\Models\BaseModel;

class MessageModel extends BaseModel
{
    protected $table = 'cms_message';

    public $dateFormat = 'U';


    public $guarded = [];

    protected $dates = [
        'created_at',
        'updated_at',
        'replied_at',
    ];

    public function fromUser()
    {
        return $this->belongsTo('DC\UserCenter\Models\UserBaseModel','from_uid','member_id');
    }

    public function toUser()
    {
        return $this->belongsTo('DC\UserCenter\Models\UserBaseModel','to_uid','member_id');
    }
}
